<!-- templates/error.html -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - 花艺AI测试应用</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <style>
        body { padding-top: 2rem; }
        .header { margin-bottom: 2rem; }
        .error-container { max-width: 600px; margin: 0 auto; text-align: center; }
        .error-icon { font-size: 5rem; color: #dc3545; margin-bottom: 2rem; }
        .error-card { border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
        .suggestions { margin-top: 2rem; text-align: left; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header text-center">
            <h1>花艺AI测试应用</h1>
            <p class="lead">出错了</p>
            <nav class="nav justify-content-center">
                <a class="nav-link" href="/">首页</a>
                <a class="nav-link" href="/upload">上传知识</a>
                <a class="nav-link" href="/image">生成图像</a>
                <a class="nav-link" href="/speech">语音交互</a>
                <a class="nav-link" href="/video/list">视频库</a>
                <a class="nav-link" href="/status">系统状态</a>
            </nav>
        </div>

        <div class="error-container">
            <div class="error-icon">
                <i class="bi bi-exclamation-triangle-fill"></i>
            </div>
            
            <div class="card error-card">
                <div class="card-header bg-danger text-white">
                    <h3 class="mb-0">出错了</h3>
                </div>
                <div class="card-body p-4">
                    <h4>{{ message or '发生了一个错误' }}</h4>
                    <p class="text-muted mt-3">{{ description or '很抱歉，处理您的请求时遇到了问题。' }}</p>
                    
                    <div class="mt-4">
                        <a href="javascript:history.back()" class="btn btn-outline-secondary me-2">
                            <i class="bi bi-arrow-left"></i> 返回上一页
                        </a>
                        <a href="/" class="btn btn-primary">
                            <i class="bi bi-house-door"></i> 返回首页
                        </a>
                    </div>
                </div>
            </div>
            
            <div class="suggestions">
                <h5>您可以尝试：</h5>
                <ul class="list-group">
                    <li class="list-group-item">
                        <i class="bi bi-arrow-clockwise me-2"></i> 刷新页面重试
                    </li>
                    <li class="list-group-item">
                        <i class="bi bi-clock-history me-2"></i> 稍后再试
                    </li>
                    <li class="list-group-item">
                        <i class="bi bi-check-circle me-2"></i> 检查网络连接是否正常
                    </li>
                    <li class="list-group-item">
                        <i class="bi bi-gear me-2"></i> 查看系统状态
                        <a href="/status" class="btn btn-sm btn-outline-info float-end">
                            查看系统状态
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
